import 'package:flutter/material.dart';
import 'package:people_big_people/view/loading.dart';

import '../utils/status_bar_color.dart';
import 'lifecycle_scope.dart';

Widget BaseScaffold(
    {required Widget body,
    Widget? bottomNavigationBar,
    bool? resizeToAvoidBottomInset,
    LifecycleScopeCallback? onResumed,
    LifecycleScopeCallback? onPaused,
    StatusBarColor? statusBarColor}) {
  return LifecycleScope(
    onPaused: onPaused,
    onResumed: onResumed,
    statusBarColor: statusBarColor ?? StatusBarColor.light,
    child: Scaffold(
      body: body,
      resizeToAvoidBottomInset: resizeToAvoidBottomInset ?? false,
      bottomNavigationBar: bottomNavigationBar == null
          ? null
          : Theme(
              data: ThemeData(
                brightness: Brightness.light,
                splashColor: Colors.transparent, //去除底部导航水波纹
                highlightColor: Colors.transparent, //去除底部导航水波纹
              ),
              child: bottomNavigationBar),
    ),
  );
}
